<template>
  <div>
	

	<section class="featured-block text-center">
		<div class="container">


			<table>
					<tr >
						<td style="padding:5px;">
							
							用户名:

						</td>
						<td style="padding:5px;">
							
							<input type="text" v-model="username" />

						</td>
					</tr>

					<tr>
						<td style="padding:5px;">
							
							密码:

						</td>
						<td style="padding:5px;">
							
							<input type="password" v-model="password" />

						</td>
					</tr>


					<tr>
						<td style="padding:5px;">
							

						</td>
						<td style="padding:5px;">
							
							<Button @click="submit">提交</Button> &nbsp;&nbsp;


						</td>
					</tr>

			</table>
			
			

		</div>
	</section>
	

	
	
    
  </div>
  
</template>


 
<script>


export default {
  data () {
    return {
      username:'',
      password:'',
    }
  },
  
  mounted:function(){

   
  
},
  methods:{

  	
  	//重置
  	reset:function(){

  		this.username = '';
  		this.password = '';

  	},
  	//提交注册
  	submit:function(){

  		if(this.username == ''){

  			//alert('用户名不能为空');
  			this.$Message('用户名不能为空');
  			return false;
  		}

  		if(this.password == ''){

  			//alert('用户名不能为空');
  			this.$Message('密码不能为空');
  			return false;
  		}

  		//发送请求
  		this.axios.get('http://localhost:8000/kaoregister/',{params:{username:this.username,password:this.password}}).then((result) =>{

  						console.log(result);
  						this.$Message(result.data.message);

  		});



  	}

     
  }
}


</script>
 
<style>



</style>